package com.xcw.test.caozuo;

import java.util.Scanner;

/**
 * @author bhx
 * @Class P10_
 * @date 2022/11/13 3:27
 * @Description TODO
 */
public class P19_ {
    private static Scanner scanner;

    public static int getLessCount(int[] ints, int index){
        int sum = 0;
        for (int i = 0; i < index; i++) {
            if (ints[i] < ints[index]){
                sum++;
            }
        }
        return sum;
    }

    public static void main(String[] args) {
        scanner = new Scanner(System.in);
        int num = scanner.nextInt();
        scanner = new Scanner(System.in);
        String line = scanner.nextLine();
        String[] lines = line.split("\\s+");
        int[] ints = new int[num];
        for (int i = 0; i < lines.length; i++) {
            ints[i] = Integer.valueOf(lines[i]);
        }
        StringBuffer sb = new StringBuffer();
        for (int i = 0; i < ints.length; i++) {
            sb.append(getLessCount(ints, i) + " ");
        }
        System.out.println(sb.toString());
    }
}
